/**
 * @Auto generation code
 * We Chat Controller
 */
import request from '../common/request/request.js'

/**
 * 
 * path, params, loading
 * 微信公众号接口调用地址 - GET
 */
export const wechatInitCheck = async ({// query params
		signature ,   // signature ,必填 
		timestamp ,   // timestamp ,必填 
		nonce ,   // nonce ,必填 
		echostr   // echostr ,必填 
	
}, loading) => {
	return await request.get('/wechat', {
		 signature,  timestamp,  nonce,  echostr, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 微信消息处理 - POST
 */
export const handlePostMsg = async ({// query params
		signature ,   // signature ,必填 
		timestamp ,   // timestamp ,必填 
		nonce   // nonce ,必填 
	
}, loading) => {
	return await request.post('/wechat', {
		 signature,  timestamp,  nonce, 
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 微信网页URL的config配置 - GET
 */
export const getWechatGetJsConfig = async ({// query params
		url   // url ,必填 
	
}, loading) => {
	return await request.get('/wechat/config', {
		 url, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 微信JS校验签名 - POST
 */
export const getWechatJsConfig = async (loading) => {
	return await request.post('/wechat/config', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 查询微信支付的订单信息 - GET
 */
export const wechatOrderCheck = async ({// query params
		orderNo   // orderNo ,必填 
	
}, loading) => {
	return await request.get('/wechat/query', {
		 orderNo, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * wechatRefund - GET
 */
export const wechatRefund = async ({// query params
		tran_id   // tran_id ,必填 
	
}, loading) => {
	return await request.get('/wechat/refund_test', {
		 tran_id, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * 修复微信支付的订单状态 - GET
 */
export const wechatRepair = async ({// query params
		orderNo   // orderNo ,必填 
	
}, loading) => {
	return await request.get('/wechat/repair', {
		 orderNo, 
	}, loading)
}

